import 'package:bloc/bloc.dart';

import 'event.dart';
import 'state.dart';

class BiliTabarBloc extends Bloc<BiliTabarEvent, BiliTabarState> {
  BiliTabarBloc() : super(BiliTabarState().init()) {
    on<InitEvent>(_initEvent);
  }

  void _initEvent(InitEvent event, Emitter<BiliTabarState> emit) {
    state.selectIndex = event.index;
    emit(state.clone());
  }
}
